#!/bin/bash


#
# Round picture border
#
# ----------
# -- Args --
# ----------
# > radius of the rounded

convert -strip -depth 8  -  \( +clone  -threshold -1 -draw "fill black polygon 0,0 0,$1 $1,0 fill white circle $1,$1 $1,0 " \( +clone -flip \) -compose Multiply -composite \( +clone -flop \) -compose Multiply -composite \) +matte -compose CopyOpacity -composite "${2:-png}":- 
